// mock用于模拟随机数据，拦截ajax
import Mock from "mockjs";

// 在webpack中，图片与json格式默认对外暴露，json文件中不需要写了
import banner from "./banner.json";
import floor from "./floor.json";
import detail from "./detail.json";
import address from "./address.json";

// 需要注意json文件内需要图片资源，
// "/images/banner1.jpg"
// 在webpack打包文件的时候，会将public文件内的文件直接放到dist目录下

Mock.mock("/mock/banner", {
	code: 200,
	data: banner,
});

Mock.mock("/mock/floor", {
	code: 200,
	data: floor,
});

Mock.mock("/mock/item", {
	code: 200,
	data: detail,
});

Mock.mock("/mock/address", {
	code: 200,
	data: address,
});
